home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Draw / Include / AlgnObFr.h next >
Encoding:
Text File  |  1995-11-08  |  2.8 KB  |  99 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                AlgnObFr.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef ALGNOBFR_H
  11. #define ALGNOBFR_H
  12.  
  13. // ----- Framewrk Layer -----
  14.  
  15. #ifndef FWFRAME_H
  16. #include "FWFrame.h"
  17. #endif
  18.  
  19. #ifndef FWGADGET_H
  20. #include "FWGadget.h"
  21. #endif
  22.  
  23. // ----- Foundation Layer -----
  24.  
  25. #ifndef FWMFCONN_H
  26. #include "FWMFConn.h"
  27. #endif
  28.  
  29. //========================================================================================
  30. // Foward declarations
  31. //========================================================================================
  32.  
  33. class FW_CLASS_ATTR CDrawPart;
  34.  
  35. //========================================================================================
  36. // CLASS CAlignObjectsFrame
  37. //========================================================================================
  38.  
  39. class FW_CLASS_ATTR CAlignObjectsFrame : public FW_CFrame
  40. {
  41. //----------------------------------------------------------------------------------------
  42. // Constants
  43. //
  44. public:
  45.     static const ODID kOkButtonId;
  46.     static const ODID kCancelButtonId;
  47.     static const ODID kTopToBottomClusterId;
  48.     static const ODID kLeftToRightClusterId;
  49.     static const ODID kNoneId;
  50.     static const ODID kTopEdgesId;
  51.     static const ODID kCenterId;
  52.     static const ODID kBottomEdgesId;
  53.     static const ODID kDistributeSpaceId;
  54.     static const ODID kSampleAlignmentId;
  55.  
  56. //----------------------------------------------------------------------------------------
  57. // Initialization/destruction
  58. //
  59. public:
  60.     CAlignObjectsFrame(Environment* ev, ODFrame* odFrame, CDrawPart* drawPart);
  61.     virtual ~ CAlignObjectsFrame();
  62.  
  63.     virtual void        CreateGadgetLayout();
  64.  
  65.     virtual void         Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  66.     
  67. private:
  68.     void                HandleButtonPressed(const FW_CNotification& notification);
  69.  
  70. private:
  71.     CDrawPart*        fDrawPart;
  72.     FW_TMemberFunctionConnection<CAlignObjectsFrame> fConnection;
  73. };
  74.  
  75. //========================================================================================
  76. // CLASS CSampleAlignmentGadget
  77. //========================================================================================
  78.  
  79. class CSampleAlignmentGadget : public FW_CGadget
  80. {
  81. public:
  82.     FW_DECLARE_CLASS
  83.  
  84. // ----- Initialization/destruction
  85.  
  86. public:
  87.     CSampleAlignmentGadget(Environment* ev, 
  88.                             const FW_CClassInfo& classInfo, FW_CFrame* frame, ODID id,
  89.                                  const FW_CPoint& location, const FW_CPoint& size);
  90.     CSampleAlignmentGadget(Environment* ev, 
  91.                             const FW_CClassInfo& classInfo, FW_CGadget* enclosure, ODID id,
  92.                                const FW_CPoint& location, const FW_CPoint& size);
  93.     virtual ~ CSampleAlignmentGadget();
  94.  
  95.     virtual void        Draw(Environment* ev, const FW_CGadgetContext& gc);
  96. };
  97.  
  98. #endif
  99.